package com.matace.keychain.data;

import android.os.Handler;
import com.matace.keychain.domain.SplashUseCase;

public class SplashRepositoryImpl implements SplashUseCase {
    private final long delayMillis;

    // 构造方法，传入延迟时间（毫秒）
    public SplashRepositoryImpl(long delayMillis) {
        this.delayMillis = delayMillis;
    }

    @Override
    public void startSplash(Runnable onFinish) {
        // 使用 Handler 实现延迟执行，delayMillis 毫秒后执行 onFinish.run()
        new Handler().postDelayed(onFinish, delayMillis);
    }

}